{include file="common/head"/}
<div class="admin-main layui-anim layui-anim-upbit">
    
    <form class="layui-form layui-form-pane">
        <input type="hidden" name="user_id" id="" value="{$list.user_id}">
        <fieldset class="layui-elem-field layui-field-title">
            <legend>用户信息</legend>
        </fieldset>


        <div class="layui-form-item">
            <label class="layui-form-label">姓名</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.realname}"
                disabled    class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">昵称</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.nickname}" disabled
                     class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">性别</label>
            <div class="layui-input-4">
                <input type="radio"  title="男" {if $list.sex==1}checked{/if} disabled>
                <input type="radio" title="女" {if $list.sex==2}checked{/if} disabled>
                <input type="radio" title="未知" {if $list.sex==3}checked{/if} disabled >
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">用户余额</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.money}" 
                disabled   placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">累计消费</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.consumption_money}" 
                disabled    class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">实际消费</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.real_money}" 
                disabled  placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">微信头像</label>
            <div class="layui-input-4">
                <img src="{$list.avatar}" alt="" style="width: 100px;height: 100px;">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">推荐人</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.father_id}" 
                disabled     class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">手机号</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.phone}" 
                disabled    placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">vip等级</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.vip_id}" 
                disabled    placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">vip卡号</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.vip_number}" 
                disabled   placeholder="请输入手机号" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">状态</label>
            <div class="layui-input-4">
                <input type="radio" name="user_status" value="0" title="正常" {if $list.user_status==0}checked{/if}>
                <input type="radio" name="user_status" value="1" title="禁用" {if $list.user_status==1}checked{/if}>
            </div>
        </div>
        

        <div class="layui-form-item">
            <label class="layui-form-label">注册时间</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" disabled  value="{:date('Y-m-d h:i:s',$list.user_addtime)}" 
                     class="layui-input" >
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">分享二维码</label>
            <div class="layui-input-4">
                <img src="{$list.eqimg}" alt="" style="width: 100px;height: 100px;">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">身份证号</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.idcard}" 
                disabled   placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">关注状态</label>
            <div class="layui-input-4">
                <input type="text" maxlength="200" value="{$list.subscribe==0?'未关注':'已关注'}" 
                disabled    placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="button" class="layui-btn" id="submit" lay-submit=""
                    lay-filter="sys">{:lang('submit')}</button>
            </div>
        </div>


    </form>
</div>
{include file="common/foot"/}
<script>
   

    layui.use(['form', 'layer', 'upload'], function () {
        var form = layui.form, layer = layui.layer, upload = layui.upload, $ = layui.jquery;
        form.verify({
            title: function (value) {
                if (value == '') {
                    return '请输入优惠券分类名称!';
                }
            },

        });
        form.render()
        form.on('submit(sys)', function (data) {
            $("#submit").attr({ disabled: "disabled" });
            loading = layer.load(1, { shade: [0.1, '#fff'] });
            $.post("{:url('adminstate')}", data.field, function (res) {
                layer.close(loading);
                if (res.errorCode == 0) {
                    layer.msg(res.msg, { icon: 1, time: 1000 }, function () {
                        location.href = '{:url("index")}';
                    });
                } else {
                    $("#submit").removeAttr("disabled");
                    layer.msg(res.msg, { icon: 2, time: 1000 });
                }
            });
        })
    })


</script>


</body>

</html>